
import request from "../../utils/request";

//支付类型
export function payTypeList(params = {}) {
  return request({
    url: "api/v1/pay-type-list",
    method: "get",
    params: params,
  });
}

//创建订单
export function createOrder(params = {}) {
  return request({
    url: "api/v1/create-order",
    method: "post",
    data: params,
  });
}


//创建订单 -- 未登录
export function subscribeCreateOrder(params = {}) {
  return request({
    url: "api/v1/subscribe-create-order",
    method: "post",
    data: params,
  });
}



//支付宝+微信支付
export function doPayment(params = {}) {
  return request({
    url: "api/v1/do-payment",
    method: "post",
    data: params,
  });
}

//支付宝支付
export function alipay(params = {}) {
  return request({
    url: "api/v1/alipay",
    method: "post",
    data: params,
  });
}

//检查支付状态
export function checkPay(params = {}) {
  return request({
    url: "api/v1/check-pay",
    method: "post",
    data: params,
  });
}